#ifndef __PID_H
#define __PID_H
#include "stm32f10x.h" 
struct  pid
{
    float p;
    float i;
    float d;

    float sumErr;
    float lastErr;
};
void pid_init(struct pid *pid);
void pid_set(struct pid *pid,float p,float i,float d);
int Velocity(struct pid *pid,int Target,int encoder_left,int encoder_right);
int16_t Vertical(struct pid *pid,float Med,float Angle,float gyro_Y);
#endif